package abc;

import java.util.Scanner;

public class Hello {
    public static void main(String[] args) {
        System.out.println ("世界真美好，我要学java");
        Scanner input =new Scanner(System.in);
        int rd =(int)(Math.random()*100+1);
        while(true){
            System.out.println("请输入你猜得数");
            int n = input.nextInt();
            if(n>rd){
                System.out.println("很遗憾你猜得数大了，请继续");
            }
            if(n<rd){
                System.out.println("很遗憾你猜小了，请继续");
            }
            if(n==rd){
                System.out.println("恭喜你猜对了");
                break;
            }
        }
    }
}


